﻿<!DOCTYPE html>
<html>

<head>
    <title>bearchain</title>
    <!-- css -->
    <link rel="stylesheet" href="static/css/swiper.min.css">
    <link rel="stylesheet" href="static/css/reset.css">
    <link rel="stylesheet" href="static/css/mycss.css">
    <script src="static/js/jquery-1.8.3.min.js"></script>
    <script src="static/js/qrcode.min.js"></script>
</head>

<body>
    <header>
        <div class="inner">
            <div class="h-left">
                <a href="/"><img src="static/picture/logo.png" alt=""></a>
            </div>
            <div class="h-right">
                <a href="/"><span>Home</span></a>
                <a href="/statics/MEP___en.pdf"><span>M.E.P</span></a>
                <!-- <a href="/site/rule"><span>The rules</span></a> -->
                <a href="/site/agreement"><span>Sign up</span></a>
                <a href="/site/vote"><span>Vote</span></a>
                <form action="/site/lan" method="post" id='lang_form'>
                    <select name="language" id="lang_select">
                        <option selected="selected" data-url='/site/seten' value="en">English
                        </option>
                        <option  data-url='/site/setzh' value="zh">中文
                        </option>
                    </select>
                </form>
                <script type="text/javascript">
                    $('#lang_select').change(function() {
                        var url = $('#lang_select option:selected').data('url');
                        window.location.href = url;
                    });
                </script>
            </div>
        </div>
    </header>

    <section><!-- 须知弹窗 -->
<div class="div-tc">
  <div>
    <h1>REGISTRATION POLICY</h1>
    <div>
      <p>1.Participating in the Super Node campaign requires pledge 300,000BRC in advance;</p>
      <p>2.If your team failed to be selected as Super Node, the pledged BRC will be returned once after the main network of Baer Chain is officially launched;</p>
      <p>3.If your team are selected as Super Node successfully, your BRC will continue to pledge until your team exits the super node.</p>
    </div>
    <div class="enter">
      <form action='/site/enroll' style="font-size: 20px;">
        <label><input type="checkbox" name="agreement" id='agreement' value="1">Agree</label>
  <!--      <button onclick="window.location.href ='/site/enroll'">NEXT</button>-->
        <button id="to_enroll">NEXT</button>
      </form>
    </div>
  </div>
</div> 
<style type="text/css">
  .div-tc > div p{
    font-size: 20px;
    margin-top: 57px;
  }
  .enter{
    margin-top: 90px;
    width: 250px;
  }
  .div-tc > div h1{
     font-size: 36px;
  }
</style></section>

    <footer>
        <div id="footer">
            <div class="left">
                <h1>BAER CHAIN</h1>
                <div class="red-div"></div>
                <p class="one">Baer Chain is an online distributed ecological game platform that is based on the
        Blockchain technology</p>
                <!-- <p class="two">Copyright @2016-2017 Beerlink.com Bell chain blockchain all rig</p> -->
            </div>
            <div class="right">
                <h1>CONTACT US</h1>
                <div class="red-div"></div>
                <div class="ico">
                    <a href="https://www.facebook.com/baer.chain"><img src="static/picture/10.png" alt=""></a>
                    <a href="https://twitter.com/BaerChain?s=05"><img src="static/picture/11.png" alt=""></a>
                    <a href="https://0.plus/#/BaerChainCN"><img src="static/picture/12.png" alt=""></a>
                    <a href="/cdn-cgi/l/email-protection#c2a0a3a7b0a1aaa3abac82a0a3a7b0a1aaa3abacecaca7b6"><img src="static/picture/15.png" alt=""></a>
                    <a href="https://weibo.com/6667329799/profile?rightmod=1&wvr=6&mod=personinfo"><img src="static/picture/14.png" alt=""></a>
                </div>
            </div>
        </div>
        <!--  <h3>其它页面</h3>-->
        <!--  <ul>-->
        <!--    <li>-->
        <!--      <a href="/site/vote">投票页面</a>-->
        <!--    </li>-->
        <!--    <li>-->
        <!--      <a href="/site/enroll">报名页面</a>-->
        <!--    </li>-->
        <!--    <li>-->
        <!--      <a href="/site/rule">规则页面</a>-->
        <!--    </li>-->
        <!--    <li>-->
        <!--      <a href="/site/info">节点详情页面</a>-->
        <!--    </li>-->
        <!--  </ul>-->
    </footer>


    <script data-cfasync="false" src="static/js/email-decode.min.js"></script><script src="static/js/jquery.min.js"></script>
    <script src="static/js/swiper.min.js"></script>
    <!-- <script src="static/js/qrcode.min.js"></script> -->
    <script>
        // 轮播
        var mySwiper = new Swiper('.swiper-container', {
            // autoplay: true,//可选选项，自动滑动
            slidesPerView: 5,
            slidesPerGroup: 5,
            spaceBetween: 20,
            loop: true,
            navigation: {
                nextEl: '.swiper-button-next',
                prevEl: '.swiper-button-prev',
            },
        })

        //表单验证提交
        function checkip() {
            var username = $("#username").val();
            var img1 = $("#inputFile1_input").val();
            var img2 = $("#inputFile2_input").val();
            var email = $("#email").val();
            var teamI = $(".textarea1").val();

            if (username && img1 && img2 && email && teamI) {
                alert('请上传图片，并填写所有必填项目');
                return false;
            } else {
                return true;
            }
        }

        // 投票
        $(document).ready(function() {
            var a = '';
            $('.one-ico div').mouseover(function() {
                var pval = $(this).find('p').text();
                var bg_img = $(this).data('img');
                if (pval) {
                    $(this).css('background-image', "url('"static/images/4d5222b9d2814a09b681d8a3c12864ea.gif"')");
                    $(this).find('p').css('display', 'block');
                }
            })

            $('.one-ico div').mouseout(function() {
                var pval = $(this).find('p').text();
                var bg_img = $(this).data('img');
                if (pval) {
                    $(this).css('background-image', "url('"static/images/4d5222b9d2814a09b681d8a3c12864ea.gif"')");
                    $(this).find('p').css('display', 'none');
                }
            })

            // 图片上传按键
            $('#imgFile1').click(function() {
                $('#inputFile1').click();
            })
            $('#imgFile2').click(function() {
                $('#inputFile2').click();
            })

            //遮罩层
            $('#video-img').click(function() {
                $(".video-playbody").css("display", "flex");
                $('body').css('overflow', 'hidden');
            })

            $('.video-playbody > button').click(function() {
                $(".video-playbody").css("display", "none");
                $('body').css('overflow', 'visible');
                var video = document.getElementById("diveoID2")
                video.load();
            });

            //添加div遮罩层
            $(".one-ico").mouseover(function() {
                $(this).find(".one-shade").css('background', 'rgba(1, 1, 1, 0.5)');
            });

            $(".one-ico").mouseout(function() {
                $(this).find(".one-shade").css('background', 'transparent');
            });

            //点击图片开始播放
            // $(".play > img").click(function () {
            //     // alert(1111)
            //     var video = document.getElementById("diveoID")
            //     video.play();
            //     $(".play").css('display', 'none')
            //     $("#diveoID").css('width', '50.1%')
            //     a = 1;
            // })

            //点击video的时候退出
            // $("#diveoID").click(function () {
            //     if (a == 1) {
            //         var video = document.getElementById("diveoID")
            //         video.load();
            //         $(".play").css('display', 'flex')
            //         $("#diveoID").css('width', '100%')
            //         a = '';
            //     }
            // })

            //缩略图
            // $("#inputFile").change(function(){
            //   // console.log(11111)
            //   var preview = document.querySelector("#upImg");
            //   var file = document.querySelector("input[type=file]").files[0];
            //   var reader = new FileReader();
            //   if(file){
            //     reader.readAsDataURL(file);
            //   }else{
            //     preview.src = '';
            //   }
            //
            //   reader.onloadend = function(){
            //     preview.src = reader.result;
            //   }
            // })

            //ajax 上传图片
            var uploading = false;

            $("#inputFile1").on("change", function(e) {
                if (uploading) {
                    alert('文件正在上传，请稍后……');
                    return false;
                }
                var file = e.currentTarget.files[0];
                var formData = new FormData();
                formData.append('file', file);
                $.ajax({
                    url: "/files/upload ",
                    type: 'POST',
                    cache: false,
                    data: formData,
                    processData: false,
                    contentType: false,
                    dataType: "json",
                    beforeSend: function() {
                        uploading = true;
                    },
                    success: function(data) {
                        if (data.hash != '') {
                            $("#upImg1").attr("src", '/images/' + data.hash + '.png');
                            $('#inputFile1_input').val(data.hash)
                        } else {
                            alert(data.msg);
                        }
                        uploading = false;
                    }
                })
            })

            var uploading2 = false;

            $("#inputFile2").on("change", function(e) {
                if (uploading2) {
                    alert('文件正在上传，请稍后……');
                    return false;
                }
                var file = e.currentTarget.files[0];
                var formData = new FormData();
                formData.append('file', file);
                $.ajax({
                    url: "/files/upload ",
                    type: 'POST',
                    cache: false,
                    data: formData,
                    processData: false,
                    contentType: false,
                    dataType: "json",
                    beforeSend: function() {
                        uploading2 = true;
                    },
                    success: function(data) {
                        if (data.hash != '') {
                            $("#upImg2").attr("src", '/images/' + data.hash + '.png');
                            $('#inputFile2_input').val(data.hash)
                        } else {
                            alert(data.msg);
                        }
                        uploading2 = false;
                    }
                })
            })

            //判断userID生成二维码
            $("#username").blur(function() {
                var useID = $("#username").val();
                var codeImg = $("#codeImg");
                var path = '';
                if (useID) {
                    codeImg.css('display', 'block');
                    path = '/site/captcha?name=' + useID;
                    codeImg.attr('src', path);
                } else {
                    codeImg.css('display', 'none');
                }
            })

            //判断必填信息，提交表单
            // $(".submit").on('click',function(){
            //     if($("#inputFile2_input").val() && $("#inputFile1_input").val()){
            //       alert('请上传图片并填写其他必选项目');
            //     }
            // })
            // $("#inputFile1").change(function () {
            //     $.post("/files/upload",
            //         {
            //             logo: document.querySelector("#inputFile1").files[0],
            //         },
            //         function (data, status) {
            //             console.log("数据: \n" + data + "\n状态: " + status);
            //         }
            //     )
            // })

            // $("#inputFile2").change(function () {
            //     $.post("/files/upload",
            //         {
            //             cover: document.querySelector("#inputFile1").files[0],
            //         },
            //         function (data, status) {
            //             console.log("数据: \n" + data + "\n状态: " + status);
            //         }
            //     )
            // })
        })
    </script>
    </body>

</html> 